Alexander Larsson [Fri, 22 Mar 2019 12:52:08 +0000 (13:52 +0100)]
broadway: Don't crash of drag-resizing when already active
This is what the X11 code does.
Alexander Larsson [Fri, 22 Mar 2019 12:42:26 +0000 (13:42 +0100)]
broadway: Send actual float32, not some hack
Alexander Larsson [Fri, 22 Mar 2019 12:38:19 +0000 (13:38 +0100)]
broadway: Use DataView instead of hand-rolled int parsers
This is nicer in general, but also will let us do floats more sanely.
Alexander Larsson [Fri, 22 Mar 2019 11:42:12 +0000 (12:42 +0100)]
Broadway: Add node for debug nodes
This can be helpful when debugging broadway.
Alexander Larsson [Fri, 22 Mar 2019 09:02:18 +0000 (10:02 +0100)]
broadway: Don't fall back for translation transform nodes
These are trivial anyway
Christoph Reiter [Tue, 26 Mar 2019 15:37:22 +0000 (16:37 +0100)]
CI: set a timeout multiplier for the tests
CI can be slower than your normal dev machine so give it a bit more time
Matthias Clasen [Tue, 26 Mar 2019 12:38:18 +0000 (12:38 +0000)]
Merge branch 'wip/layout-manager' into 'master'
Add Layout Managers
See merge request GNOME/gtk!534
Christoph Reiter [Tue, 26 Mar 2019 07:19:42 +0000 (08:19 +0100)]
win32: remove another call to gdk_device_warp()
Inline the implementation (untested). To fix the build.
Christoph Reiter [Tue, 26 Mar 2019 06:59:01 +0000 (07:59 +0100)]
win32: remove unused gdk_display_warp_device
to fix the build
Matthias Clasen [Tue, 26 Mar 2019 03:29:34 +0000 (23:29 -0400)]
Yet another win32 build fix
So much empty warping.
Emmanuele Bassi [Wed, 20 Mar 2019 15:37:15 +0000 (15:37 +0000)]
Changes after review
- Rename GtkLegacyLayout to GtkCustomLayout
- Use for() to iterate over children in GtkBinLayout
- Whitespace fixes for code imported from GtkBox
- Store the GtkLayoutChild instances inside LayoutManager
- Simplify the GtkLayoutManager API by dropping unnecessary arguments
- Fix the ownership model of GtkLayoutManager
Emmanuele Bassi [Mon, 4 Mar 2019 13:15:19 +0000 (13:15 +0000)]
Parse layout properties
If a widget has a LayoutManager instance, then we want to parse layout
properties in UI description files; the grammar is similar to packing
properties in GtkContainer:
<child>
<object ...>
<property name="...">...</property>
<layout>
<property name="pname">value</property>
</layout>
</object>
</child>
The properties are applied after a child has been added to its parent,
to the parent's layout manager property should be set.
Emmanuele Bassi [Mon, 4 Mar 2019 15:03:34 +0000 (15:03 +0000)]
Add GtkBinLayout
Like GtkBin, but lets you lay out multiple children instead of just one.
Emmanuele Bassi [Mon, 4 Mar 2019 13:36:52 +0000 (13:36 +0000)]
Port GtkSwitch to GtkLegacyLayout
Emmanuele Bassi [Mon, 28 Jan 2019 14:03:25 +0000 (14:03 +0000)]
Add GtkLegacyLayout
GtkLegacyLayout is a layout manager for the transitional period between
the introduction of layout managers and the removal of GtkWidget virtual
functions for the size negotiation.
Emmanuele Bassi [Fri, 25 Jan 2019 12:30:51 +0000 (12:30 +0000)]
docs: Add chapter on layout managers
Emmanuele Bassi [Fri, 25 Jan 2019 12:19:34 +0000 (12:19 +0000)]
Port GtkBox to GtkBoxLayout
We can delegate all the layout management to a GtkBoxLayout, now that we
have one.
Emmanuele Bassi [Wed, 19 Dec 2018 17:32:24 +0000 (17:32 +0000)]
Add GtkBoxLayout
The same layout policy of GtkBox, without all the GtkContainer calories.
Emmanuele Bassi [Wed, 19 Dec 2018 16:01:17 +0000 (16:01 +0000)]
Add GtkLayoutChild
Layout managers needs a way to store properties that control the layout
policy of a widget; typically, we used to store these in GtkContainer's
child properties, but since GtkLayoutManager is decoupled from the
actual container widget, we need a separate storage. Additionally, child
properties have their own downsides, like requiring a separate, global
GParamSpecPool storage, and additional lookup API.
GtkLayoutChild is a simple GObject class, which means you can introspect
and document it as you would any other type.
Emmanuele Bassi [Wed, 19 Dec 2018 16:04:05 +0000 (16:04 +0000)]
Rename the internal GtkLayoutChild type
The type is completely private to GtkLayout, so there's really no need
to namespace it.
Emmanuele Bassi [Thu, 13 Dec 2018 14:04:00 +0000 (14:04 +0000)]
Add GtkWidget:layout-manager
We can use a constructor property for existing container widgets with
a layout policy, and move the layout policy implementation out of the
widget itself and into a LayoutManager subclass.
Emmanuele Bassi [Wed, 12 Dec 2018 17:20:28 +0000 (17:20 +0000)]
Hook GtkLayoutManager into GtkWidget
We delegate the size request mode, the measuring, and the allocation of
a widget through a GtkLayoutManager instance, if one has been attached
to the widget; otherwise, we fall back to the widget's own implementation.
Emmanuele Bassi [Wed, 12 Dec 2018 15:24:41 +0000 (15:24 +0000)]
Add GtkLayoutManager
A base abstract class for layout manager delegate objects.
Layout managers are associated to a single widget, like event
controllers, and are responsible for measuring and allocating the
children of the widget they are bound to.
Matthias Clasen [Tue, 26 Mar 2019 00:05:07 +0000 (20:05 -0400)]
Fix the windows build
There was another warp implementation that needed to be removed.
This commit also addresses a number of compiler warnings
in passing.
Timm Bäder [Sun, 17 Mar 2019 06:20:53 +0000 (07:20 +0100)]
Doc comment fixup
Timm Bäder [Sat, 16 Mar 2019 05:16:43 +0000 (06:16 +0100)]
popover: Always measure contents gizmo
Otherwise we're getting warnings about allocating a widget we haven't
measured first, which is fair. The contents gizmo itself will later take
care about whether or not the real popover child is NULL.
Timm Bäder [Sat, 16 Mar 2019 05:16:28 +0000 (06:16 +0100)]
popover: Don't try to compute_bounds of a NULL child
Matthias Clasen [Mon, 25 Mar 2019 14:15:27 +0000 (10:15 -0400)]
win32: Drop the warp implementation
We no longer support pointer warping.
Piotr Drąg [Mon, 25 Mar 2019 13:37:44 +0000 (14:37 +0100)]
Update Polish translation
Piotr Drąg [Mon, 25 Mar 2019 13:19:54 +0000 (14:19 +0100)]
Update POTFILES.in
Matthias Clasen [Sat, 23 Mar 2019 21:18:55 +0000 (17:18 -0400)]
Remove gdk_device_warp
This was only ever implemented on X11, and is
not something we want to encourage apps to do, ever.
Matthias Clasen [Sun, 24 Mar 2019 15:08:55 +0000 (11:08 -0400)]
Remove a dead file
We are not using this anymore.
Matthias Clasen [Sun, 24 Mar 2019 15:14:20 +0000 (11:14 -0400)]
color editor: Don't warn if editing is cancelled
Thats a valid way to end color picking.
Benjamin Otte [Sat, 23 Mar 2019 02:08:03 +0000 (03:08 +0100)]
Fix compile warning
Benjamin Otte [Fri, 22 Mar 2019 21:29:11 +0000 (22:29 +0100)]
Remove win32 themeing support
It was unused through all of GTK 3, so it is not worth supporting.
The best Windows themes do not make use of it at all.
LRN [Fri, 22 Mar 2019 21:10:35 +0000 (21:10 +0000)]
Merge branch 'ime-load-fix' into 'master'
Ime load fix (GTK4)
See merge request GNOME/gtk!662
Matthias Clasen [Fri, 22 Mar 2019 20:33:53 +0000 (16:33 -0400)]
Fix hover state handling
We were not paying enough attention to detail when updating
hover and focus state while generating crossing events. The
invariant that we need to preserve here is that when a widget
has focus or hover, its parent does too.
Matthias Clasen [Fri, 22 Mar 2019 19:20:06 +0000 (15:20 -0400)]
Stop walking parent surfaces for crossing event generation
We basically don't have child surfaces anymore (the last
use in popovers is on the way out). This really needs
to be done in terms of widgets, not surfaces. For now,
just stop walking parent surfaces.
Benjamin Otte [Fri, 22 Mar 2019 16:37:04 +0000 (17:37 +0100)]
cssparser: Simplify
Remove the uint parser (and use the int parser in the one user of it).
And avoid unnecessarily going through a macro.
Benjamin Otte [Fri, 22 Mar 2019 16:23:30 +0000 (17:23 +0100)]
cssparser: Remove unused functions
Matthias Clasen [Fri, 22 Mar 2019 18:44:51 +0000 (14:44 -0400)]
Remove debug spew
Руслан Ижбулатов [Fri, 4 Jan 2019 09:48:46 +0000 (09:48 +0000)]
GDK W32: Fix property setting to correctly use static strings
The strings that are set are static, so g_value_set_static_string() should
be used to set them instead of g_value_set_string().
Руслан Ижбулатов [Fri, 22 Mar 2019 15:10:02 +0000 (15:10 +0000)]
GDK W32: Test for IME correctly
ImmIsIME() doesn't work (always returns TRUE) since Vista.
Use ITfActiveLanguageProfileNotifySink to detect TSF changes,
which are equal to IME changes for us.
Also make sure that IMMultiContext re-loads the IM when keyboard layout
changes, otherwise there's a subtle bug that could happen:
* Run GTK application with non-IME layout (US, for example)
* Focus on an editable widget (GtkEntry, for example)
* IM Context is initialized to use the simple IM
* Switch to an IME layout (such as Korean)
* Start typing
* Since IME module is not loaded yet, keypresses are handled
by a default MS IME handler
* Once IME commits a character, GDK will get a WM_KEYDOWN,
which will trigger a GdkKeyEvent, which will be handled by
an event filter in IM Context, which will finally re-evaluate
its status and load IME, and only after that GTK will get
to handle IME by itself - but by that point input would
already be broken.
To avoid this we can emit a dummy event (with Void keyval),
which will cause IM Context to load the appropriate module
immediately.
Matthias Clasen [Thu, 21 Mar 2019 23:15:24 +0000 (19:15 -0400)]
entry: Disconnect text signals in dispose
This was showing up as crashes when closing
the file chooser.
Matthias Clasen [Wed, 20 Mar 2019 14:10:18 +0000 (14:10 +0000)]
Merge branch 'adwaita-remove-selectionmode-assets-master' into 'master'
Adwaita: Drop checkbox-selectionmode assets
See merge request GNOME/gtk!634
Matthias Clasen [Wed, 20 Mar 2019 14:10:05 +0000 (14:10 +0000)]
Merge branch 'adwaita-selectionmode-checkboxes-master' into 'master'
Adwaita: Fix selection-mode checkboxes
Closes #28
See merge request GNOME/gtk!629
Matthias Clasen [Wed, 20 Mar 2019 14:06:19 +0000 (14:06 +0000)]
Merge branch 'adwaita-headerbar-switch-margins-master' into 'master'
Adwaita: Adjust switch margins on headerbars
Closes #1759
See merge request GNOME/gtk!651
Matthias Clasen [Wed, 20 Mar 2019 12:32:15 +0000 (12:32 +0000)]
Merge branch 'wip/jimmac/focus-ring-radii' into 'master'
Adwaita: draw bigger radius for focus rings
Closes #1756
See merge request GNOME/gtk!649
Matthias Clasen [Wed, 20 Mar 2019 00:07:53 +0000 (20:07 -0400)]
window: Update state flags
When the window gets active / inactive, we
don't propagate events, but just send focus-in / -out
to the current focus_widget. Improve this by updating
its state flags as well.
Matthias Clasen [Tue, 19 Mar 2019 23:12:55 +0000 (19:12 -0400)]
main: Fix crossing event generation for parented roots
We were walking the parent chain here, which now
always needs to consider whether it should stop
at roots. Like this one should.
The symptom was that a label with a popup attached to
it would end up with an unintentional focus ring that
would not go away.
Alex Monday [Tue, 19 Mar 2019 14:59:05 +0000 (19:59 +0500)]
Adwaita: Adjust switch margins on headerbars
Closes https://gitlab.gnome.org/GNOME/gtk/issues/1759
Jakub Steiner [Tue, 19 Mar 2019 13:07:10 +0000 (14:07 +0100)]
Adwaita: draw bigger radius for focus rings
Fixes https://gitlab.gnome.org/GNOME/gtk/issues/1756
Benjamin Otte [Sat, 16 Mar 2019 03:48:26 +0000 (04:48 +0100)]
gtk: Don't include gtkstylecontext.h from gtkcsstypesprivate.h
And make sure it's included everywhere it's needed.
Benjamin Otte [Fri, 15 Mar 2019 21:35:07 +0000 (22:35 +0100)]
stylecontext: Move atk.h include where it belongs
Benjamin Otte [Tue, 12 Mar 2019 01:14:48 +0000 (02:14 +0100)]
paned: hide the handle widget when <2 children are visible
Benjamin Otte [Tue, 12 Mar 2019 00:41:21 +0000 (01:41 +0100)]
paned: Refactor
Don't call a useless function, call gtk_widget_set_child_visible()
directly.
Benjamin Otte [Sun, 10 Mar 2019 22:45:19 +0000 (23:45 +0100)]
singleselection: Add forgotten notify emission
Also, add docs for the model property while I'm looking at the file.
Benjamin Otte [Sat, 9 Mar 2019 13:44:06 +0000 (14:44 +0100)]
revealer: Always use identity transform for revealed child
Refactor the child allocation machinery, so that the complex allocation
paths are only run when the animation is running.
And in particular, ensure that when no animation is running, the
identity transform is allocated.
Benjamin Otte [Sat, 9 Mar 2019 12:59:03 +0000 (13:59 +0100)]
renderer: Make gsk_renderer_is_realized() public
... and add a property for it.
Benjamin Otte [Sat, 9 Mar 2019 12:36:14 +0000 (13:36 +0100)]
renderer: Remove display property
Renderers don't need a display until they get realized. And once they
get realized, they can look up the display from the surface.
Matthias Clasen [Mon, 18 Mar 2019 19:35:07 +0000 (15:35 -0400)]
One forgotten leave signal handler
Matthias Clasen [Mon, 18 Mar 2019 13:24:42 +0000 (09:24 -0400)]
Adapt to motion controller api change
The signature of the enter/leave signals changed.
Adapt all users.
Matthias Clasen [Mon, 18 Mar 2019 12:44:02 +0000 (08:44 -0400)]
motion controller: Install the properties
Oops
Matthias Clasen [Mon, 18 Mar 2019 11:50:42 +0000 (11:50 +0000)]
Merge branch 'paned-no-grab' into 'master'
paned: Don't use a grab
See merge request GNOME/gtk!644
Matthias Clasen [Mon, 18 Mar 2019 01:49:45 +0000 (01:49 +0000)]
Merge branch 'crossing-details' into 'master'
motion controller: add details to signals
See merge request GNOME/gtk!621
Matthias Clasen [Mon, 18 Mar 2019 01:10:06 +0000 (01:10 +0000)]
Merge branch 'wip/carlosg/include-constructors-header' into 'master'
gdk: Include copy of glib/gconstructor.h
See merge request GNOME/gtk!642
Matthias Clasen [Sun, 17 Mar 2019 22:55:00 +0000 (18:55 -0400)]
paned: Don't use a grab
It does not seem necessary for proper functioning
of the drag handle.
Matthias Clasen [Sun, 17 Mar 2019 22:44:36 +0000 (18:44 -0400)]
editable: Fix a thinko
When dealing with subclasses of GtkEntry, we were not
getting the property offset that is stored on the GtkEntry
type.
This was showing up as criticals when trying to set
::width-chars on a GtkFileChooserEntry.
Carlos Garnacho [Sun, 17 Mar 2019 20:29:59 +0000 (21:29 +0100)]
gdk: Include copy of glib/gconstructor.h
This is named gdkconstructor.h to avoid any possible conflicts. This fixes
the current usages of G_HAS_CONSTRUCTORS, as that header is not installed
by glib.
Piotr Drąg [Sun, 17 Mar 2019 16:17:02 +0000 (17:17 +0100)]
Update POTFILES.in
Matthias Clasen [Sun, 17 Mar 2019 05:08:02 +0000 (01:08 -0400)]
widget: Fix a mission annotation
Matthias Clasen [Sun, 17 Mar 2019 03:44:55 +0000 (23:44 -0400)]
motion controller: Add getters for crossing event targets
This information can be needed in signal handlers,
so make it available.
Matthias Clasen [Sun, 17 Mar 2019 03:29:48 +0000 (23:29 -0400)]
motion controller: Add focus properties
Add boolean properties, is-pointer-focus and
contains-pointer-focus, that track whether the pointer
is in the widget itself or in one of its descendants.
Matthias Clasen [Wed, 6 Mar 2019 19:56:46 +0000 (14:56 -0500)]
motion controller: add details to signals
The ::enter and ::leave signals get emitted up and down the
connecting path between the old an the new pointer location.
The signals are less useful if you can't find out where along
the path you are. That is what crossing mode and detail are
about, so add those to the signals.
Matthias Clasen [Sun, 17 Mar 2019 02:31:03 +0000 (22:31 -0400)]
a11y tests: Clean up the placeholder-text test
This was relying on setting has-focus for initial focus.
Matthias Clasen [Sun, 17 Mar 2019 02:42:46 +0000 (02:42 +0000)]
Merge branch 'wip/matthiasc/focus3' into 'master'
Move focus to GtkRoot
See merge request GNOME/gtk!640
Matthias Clasen [Sun, 17 Mar 2019 02:16:10 +0000 (22:16 -0400)]
xim: Stop using GtkWidget::event
It does not exist anymore. I'm removing this code now
because our CI tests are using xim and fail due to this.
Eventually, this code should be ported to use a popover.
Matthias Clasen [Sun, 17 Mar 2019 01:49:24 +0000 (21:49 -0400)]
a11y tests: Update expected results
The changes here are all related to initial focus.
Matthias Clasen [Fri, 8 Mar 2019 04:25:50 +0000 (23:25 -0500)]
Update the focus test
Check that we get the expected sequences of focus
change events for the nonlinear, inferior and ancestor
cases.
It would be nice to do the same checks for crossing
events, but we have no gtk_window_set_hover().
Matthias Clasen [Sat, 16 Mar 2019 07:06:29 +0000 (03:06 -0400)]
Use root in gdk_synthesize_crossing_events
Matthias Clasen [Fri, 8 Mar 2019 18:46:17 +0000 (13:46 -0500)]
Make gtk_widget_get_focus_child public
It doesn't really make sense to have only
the setter, but not the getter public.
Matthias Clasen [Fri, 8 Mar 2019 16:44:43 +0000 (11:44 -0500)]
Add key controller API to the docs
A bunch of API was missing here.
Matthias Clasen [Fri, 8 Mar 2019 15:21:02 +0000 (10:21 -0500)]
key controller: Enforce limitations of key forwarding
We now set current_event for focus-change as well,
so make sure to check the event type.
Matthias Clasen [Fri, 8 Mar 2019 15:19:12 +0000 (10:19 -0500)]
key controller: Improve the docs
Mention the limitations of the key forwarding api.
Matthias Clasen [Fri, 8 Mar 2019 15:16:27 +0000 (10:16 -0500)]
key controller: Add getters for focus event targets
This information can be needed in signal handlers,
so make it available.
Matthias Clasen [Fri, 8 Mar 2019 14:55:27 +0000 (09:55 -0500)]
key controller: Add focus properties
Add boolean properties, is-focus and contains-focus, that
track whether the focus is in the widget itself or in
one of its descendants.
Matthias Clasen [Fri, 8 Mar 2019 14:20:06 +0000 (09:20 -0500)]
key controller: Fix a copy/paste error
Prefix the finalize function properly.
Matthias Clasen [Thu, 7 Mar 2019 05:14:26 +0000 (00:14 -0500)]
Pass mode and detail to focus-in/out signals
This information is useful when maintaining a
'last focus' field.
Update all users.
Matthias Clasen [Fri, 8 Mar 2019 18:52:46 +0000 (13:52 -0500)]
Move maintaining the focus chain
Put this code in the same place where we generate
the crossing events.
Matthias Clasen [Fri, 8 Mar 2019 14:08:05 +0000 (09:08 -0500)]
Some fixes to crossing event generation
In the inferior and ancestor cases, we were missing
the initial/final event.
Matthias Clasen [Thu, 7 Mar 2019 04:40:29 +0000 (23:40 -0500)]
window: Use gtk_synthesize_crossing_events
Emit focus change events in the same way as crossing events.
Also change the code to only emit focus change events for
the master keyboard - we only maintain a single focus location,
so sending multiple focus change events for different devices
seems confusing.
Matthias Clasen [Thu, 7 Mar 2019 04:39:53 +0000 (23:39 -0500)]
Export gtk_synthesize_crossing_events internally
We want to use this for focus changes, now that
it can emit focus change events.
Matthias Clasen [Thu, 7 Mar 2019 03:25:31 +0000 (22:25 -0500)]
Share crossing and focus change event code
Make a single function that can emit both
enter/leave and focus change events.
Matthias Clasen [Fri, 8 Mar 2019 16:12:30 +0000 (11:12 -0500)]
gdk: Add a related_target field to some events
Crossing and focus change events are emitted between
two widgets, and want to associate both with the
events.
Matthias Clasen [Fri, 8 Mar 2019 16:27:16 +0000 (11:27 -0500)]
gdk: Rename gdk_event_set_user_data
Lets call it what it is, the target.
All of this is private api anyway.
Update all callers.
Matthias Clasen [Wed, 6 Mar 2019 21:55:27 +0000 (16:55 -0500)]
gdk: Add crossing mode and detail to focus events
We want focus events more similar to crossing events.
Matthias Clasen [Tue, 5 Mar 2019 01:15:39 +0000 (20:15 -0500)]
Clarify grab_focus docs
Matthias Clasen [Sun, 3 Mar 2019 17:31:12 +0000 (12:31 -0500)]
window: Remove initial-focus builder support
With focus-widget now a property, this is no longer needed.
Matthias Clasen [Sat, 16 Mar 2019 05:28:23 +0000 (01:28 -0400)]
window: Remove ::set-focus
The focus-widget is now a property, so we don't need
this signal anymore.
Matthias Clasen [Sun, 3 Mar 2019 13:10:14 +0000 (08:10 -0500)]
popover: Stop using ::set-focus
This will change completely when GtkPopover becomes a
root. For now, stop using ::set-focus and just use the
focus-widget property.